﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.IDAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class PrePurchaseRequestCommitteeBLL : IBLLPrePurchaseRequestCommittee
    {
        private static readonly IDALPrePurchaseRequestCommittee dal = DataAccess.CreatePrePurchaseRequestCommittee();

        public PrePurchaseRequestCommitteeBLL()
        {

        }

        public IList<PrePurchaseRequestCommitteeInfo> GetPrePurchaseRequestCommittee()
        {
            return dal.GetPrePurchaseRequestCommittee();
        }

        public IList<PrePurchaseRequestCommitteeInfo> GetPrePurchaseRequestCommittee(string record_status)
        {
            return dal.GetPrePurchaseRequestCommittee(record_status);
        }

        public PrePurchaseRequestCommitteeInfo GetPrePurchaseRequestCommittee(int seq)
        {
            return dal.GetPrePurchaseRequestCommittee(seq);
        }

        public IList<PrePurchaseRequestCommitteeInfo> GetPrePurchaseRequestCommitteeWithParent(int ppr_seq)
        {
            return dal.GetPrePurchaseRequestCommitteeWithParent(ppr_seq);
        }

        public void Insert(IList<PrePurchaseRequestCommitteeInfo> infoList, int ppr_seq)
        {
            try
            {
                dal.Insert(infoList, ppr_seq);
            }
            catch
            {
                throw;
            }
        }

        public void Insert(IList<PrePurchaseRequestCommitteeInfo> infoList, int ppr_seq, IDBManager dbManagerTrans)
        {
            try
            {
                dal.Insert(infoList, ppr_seq, dbManagerTrans);
            }
            catch
            {
                throw;
            }
        }

        public void Update(PrePurchaseRequestCommitteeInfo info)
        {
            try
            {
                dal.Update(info);
            }
            catch
            {
                throw;
            }
        }

        public void Delete(PrePurchaseRequestCommitteeInfo info)
        {
            try
            {
                dal.Delete(info);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteAll(IList<PrePurchaseRequestCommitteeInfo> infoList)
        {
            try
            {
                dal.DeleteAll(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteFromDB(IList<PrePurchaseRequestCommitteeInfo> infoList)
        {
            try
            {
                dal.DeleteFromDB(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void Restore(IList<PrePurchaseRequestCommitteeInfo> infoList)
        {
            try
            {
                dal.Restore(infoList);
            }
            catch
            {
                throw;
            }
        }

        public IList<PrePurchaseRequestCommitteeInfo> getPrePurchaseRequestCommitteeHistory(int PrSeq)
        {
            return dal.getPrePurchaseRequestCommitteeHistory(PrSeq);
        }

        public IList<PrePurchaseRequestCommitteeInfo> GetPurchaseOrderCommitteeHistory(int BidderSeq)
        {
            return dal.GetPurchaseOrderCommitteeHistory(BidderSeq);
        }
    }
}
